﻿using System;

namespace Utk
{
    class TaskSkeleton : ITask
    {
        private readonly Func<double> _getWeight;
        private readonly Action _execute;

        public TaskSkeleton(
            Func<double> getWeight,
            Action execute )
        {
            _getWeight = getWeight;
            _execute = execute;
        }

        public double GetWeight()
        {
            return _getWeight();
        }

        public void Execute()
        {
            _execute();
        }
    }
}